body {
  background: linear-gradient(135deg,#d0e7fa 0%, #faf4d7 100%);
  margin: 0;
  font-family: 'Segoe UI', Arial, sans-serif;
  min-height: 100vh;
}

#root {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  min-height: 100vh;
}

.chatterbox-app {
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 6px 32px rgba(0,0,0,0.12);
  width: 370px;
  margin: 40px auto;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.header {
  background: #FFD166;
  color: #222;
  font-weight: bold;
  font-size: 24px;
  text-align: center;
  padding: 30px 0 18px;
  letter-spacing: 1px;
  position: relative;
}

.messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px 16px 10px 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  background: #fcfcfc;
}

.message {
  border-radius: 14px;
  padding: 14px 16px;
  max-width: 75%;
  font-size: 16px;
  line-height: 1.5;
  word-break: break-word;
  position: relative;
  box-shadow: 0 2px 6px rgba(0,0,0,0.04);
  animation: fadeIn 0.2s;
}

@keyframes fadeIn { from { opacity:0; transform:translateY(30px);} to{opacity:1;transform:translateY(0);} }

.message.user {
  background: #0080FF;
  color: #fff;
  margin-left: auto;
  border-bottom-right-radius: 2px;
}

.message.bot {
  background: #eee4ff;
  color: #362266;
  margin-right: auto;
  border-bottom-left-radius: 2px;
}

.input-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 18px 18px;
  background: #faefe5;
  border-top: 1px solid #ece7e3;
}

.input-bar input[type="text"] {
  flex: 1;
  border: none;
  background: #fff8f2;
  border-radius: 10px;
  font-size: 16px;
  padding: 12px 14px;
  outline: none;
  transition: box-shadow 0.2s;
}

.input-bar button,
.input-bar .mic-btn {
  background: #0080FF;
  color: #fff;
  border: none;
  font-weight: 700;
  font-size: 15px;
  border-radius: 22px;
  padding: 0 18px;
  height: 34px;
  cursor: pointer;
  transition: background 0.18s;
}

.input-bar button:disabled { background: #ddd; color: #666; cursor: not-allowed; }

.input-bar .mic-btn {
  border-radius: 50%;
  width: 34px;
  padding: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  background: #ff577e;
  margin-left: 5px;
  font-size: 19px;
}

.input-bar .mic-btn.listening {
  background: #00cc88;
  animation: pulse 1s infinite;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0px 0 #00cc8888;}
  70% { box-shadow: 0 0 0px 7px #00cc8822;}
  100% { box-shadow: 0 0 0px 0 #00cc8800;}
}

@media (max-width: 480px) {
  .chatterbox-app {
    width: 100vw;
    margin: 0;
    border-radius: 0;
  }
}

